Field of the Disclosure
The disclosure relates to a database update method, a data redo/undo method and a memory storage apparatus, and particularly relates to an interleaving database batch update method.
Description of Related Art
Conventionally, a database used by a computer is to store data in a hard drive. The hard drive refers to a non-volatile storage device based on a hard rotary disk, in which a magnetic head close to a magnetic surface is used to store and retrieve digital data on the flat magnetic surface, and during a write operation, the digital data is written on the magnetic disc through an electromagnetic flow in a polarity changing manner. The stored data can be read in a reverse manner, for example, when the magnetic head passes over the stored data, the magnetic field causes a change of electrical signal in a coil. The hard drive includes one or more high speed rotating magnetic disks and the magnetic head disposed on an actuator arm. Therefore, although the read operation of the hard driver may read data stored in the hard disk in any order, when the magnetic head seeks a location of the required data and accesses the required data, it has to spend a seek time, a rotation time and an access time.
Each time when a data access command is executed to the database, the data in the hard disk has to be updated. Namely, the magnetic head of the hard disk has to be physically moved to the location of the data to be accessed each time when the command is executed, so that a conventional data access rate of the database is largely limited by access efficiency of the hard disk.
Therefore, it becomes an important issue of the field to accelerate the access rate of the database. A method for improving the hard disk access efficiency is, for example, to adopt a sequential access method. Since the magnetic head on the actuator arm has to be moved to the location where the data is stored during each data access operation, if the location of the data in each data access operation is not largely changed, the seek time and the rotation time spent during the movement of the magnetic head can be greatly decreased, so as to improve the access rate of the database.